<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <meta name="generator" content="Doxygen 1.8.16" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>LEAF: tPoly</title>
    <link href="tabs.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <script type="text/javascript" src="../js/iframeResizer.contentWindow.min.js"></script>
    <!-- <script src="/js/template.js"></script> -->
     <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script> 
    <link href="doxygen.css" rel="stylesheet" type="text/css" />
    <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
    <!-- <link rel="stylesheet" href="/css/tachyons.css" type="text/css" /> -->
</head>
<body class="bg-washed-green black-70 ph0 sans-serif" onload="iframeResizePipe()">
    <div>
        <!-- do not remove this div, it is closed by doxygen! -->
        <div id="titlearea">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                    </tr>
                </tbody>
            </table>
        </div>
        <!-- end header part -->
    </div>
</body>
</html><!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">tPoly<div class="ingroups"><a class="el" href="group__midi.html">MIDI</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Polyphony handler with glide and pitch bend options.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaf530a73c1d8d8d3e20403c9f33c0ab2e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#gaf530a73c1d8d8d3e20403c9f33c0ab2e">tPoly_init</a> (tPoly *const poly, int maxNumVoices, <a class="el" href="struct_l_e_a_f.html">LEAF</a> *const leaf)</td></tr>
<tr class="memdesc:gaf530a73c1d8d8d3e20403c9f33c0ab2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a tPoly to the default mempool of a <a class="el" href="struct_l_e_a_f.html" title="Struct for an instance of LEAF.">LEAF</a> instance.  <a href="group__tpoly.html#gaf530a73c1d8d8d3e20403c9f33c0ab2e">More...</a><br /></td></tr>
<tr class="separator:gaf530a73c1d8d8d3e20403c9f33c0ab2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9a3b088e0d32366b6d5f675794becf15"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#ga9a3b088e0d32366b6d5f675794becf15">tPoly_initToPool</a> (tPoly *const poly, int maxNumVoices, tMempool *const pool)</td></tr>
<tr class="memdesc:ga9a3b088e0d32366b6d5f675794becf15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a tPoly to a specified mempool.  <a href="group__tpoly.html#ga9a3b088e0d32366b6d5f675794becf15">More...</a><br /></td></tr>
<tr class="separator:ga9a3b088e0d32366b6d5f675794becf15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga03c02b27b16f700b55d8536256d310b5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#ga03c02b27b16f700b55d8536256d310b5">tPoly_free</a> (tPoly *const poly)</td></tr>
<tr class="memdesc:ga03c02b27b16f700b55d8536256d310b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free a tPoly from its mempool.  <a href="group__tpoly.html#ga03c02b27b16f700b55d8536256d310b5">More...</a><br /></td></tr>
<tr class="separator:ga03c02b27b16f700b55d8536256d310b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0a52befe767ed6ea96b26d53952a37ea"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#ga0a52befe767ed6ea96b26d53952a37ea">tPoly_noteOn</a> (tPoly *const poly, int note, uint8_t vel)</td></tr>
<tr class="memdesc:ga0a52befe767ed6ea96b26d53952a37ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a note with a given velocity to the poly handler.  <a href="group__tpoly.html#ga0a52befe767ed6ea96b26d53952a37ea">More...</a><br /></td></tr>
<tr class="separator:ga0a52befe767ed6ea96b26d53952a37ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaad8376b6c55995e763ce26d084d23a67"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#gaad8376b6c55995e763ce26d084d23a67">tPoly_noteOff</a> (tPoly *const poly, uint8_t note)</td></tr>
<tr class="memdesc:gaad8376b6c55995e763ce26d084d23a67"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove a note from the poly handler.  <a href="group__tpoly.html#gaad8376b6c55995e763ce26d084d23a67">More...</a><br /></td></tr>
<tr class="separator:gaad8376b6c55995e763ce26d084d23a67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5abdfc6cd4b26b74647cb23a822b0f38"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#ga5abdfc6cd4b26b74647cb23a822b0f38">tPoly_orderedAddToStack</a> (tPoly *const poly, uint8_t note)</td></tr>
<tr class="separator:ga5abdfc6cd4b26b74647cb23a822b0f38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf3aae31d4b20eb71be39351989bc06d1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#gaf3aae31d4b20eb71be39351989bc06d1">tPoly_setNumVoices</a> (tPoly *const poly, uint8_t numVoices)</td></tr>
<tr class="memdesc:gaf3aae31d4b20eb71be39351989bc06d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the number of voices available to play notes.  <a href="group__tpoly.html#gaf3aae31d4b20eb71be39351989bc06d1">More...</a><br /></td></tr>
<tr class="separator:gaf3aae31d4b20eb71be39351989bc06d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9ddfc026e440e208064ce48d655ee317"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#ga9ddfc026e440e208064ce48d655ee317">tPoly_setPitchGlideActive</a> (tPoly *const poly, int isActive)</td></tr>
<tr class="memdesc:ga9ddfc026e440e208064ce48d655ee317"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set whether pitch glide over note changes in voices is active.  <a href="group__tpoly.html#ga9ddfc026e440e208064ce48d655ee317">More...</a><br /></td></tr>
<tr class="separator:ga9ddfc026e440e208064ce48d655ee317"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga12e5fba9072b6e7d91d50a2e3c82bc87"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#ga12e5fba9072b6e7d91d50a2e3c82bc87">tPoly_setPitchGlideTime</a> (tPoly *const poly, float t)</td></tr>
<tr class="memdesc:ga12e5fba9072b6e7d91d50a2e3c82bc87"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set how long pitch glide over note changes in voices takes.  <a href="group__tpoly.html#ga12e5fba9072b6e7d91d50a2e3c82bc87">More...</a><br /></td></tr>
<tr class="separator:ga12e5fba9072b6e7d91d50a2e3c82bc87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8608941b79fe9ba1b8e92b5a8046a915"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#ga8608941b79fe9ba1b8e92b5a8046a915">tPoly_setPitchBend</a> (tPoly *const poly, float pitchBend)</td></tr>
<tr class="memdesc:ga8608941b79fe9ba1b8e92b5a8046a915"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the amount of pitch bend.  <a href="group__tpoly.html#ga8608941b79fe9ba1b8e92b5a8046a915">More...</a><br /></td></tr>
<tr class="separator:ga8608941b79fe9ba1b8e92b5a8046a915"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8dad5daee7f10d0bb59e96ad55ec0402"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#ga8dad5daee7f10d0bb59e96ad55ec0402">tPoly_setBendGlideTime</a> (tPoly *const poly, float t)</td></tr>
<tr class="separator:ga8dad5daee7f10d0bb59e96ad55ec0402"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1f6a93b108ac8654eaa860575d2f1cd5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#ga1f6a93b108ac8654eaa860575d2f1cd5">tPoly_setBendSamplesPerTick</a> (tPoly *const poly, float t)</td></tr>
<tr class="separator:ga1f6a93b108ac8654eaa860575d2f1cd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf30b4a4aabd43c297d49258acf8e0cb3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#gaf30b4a4aabd43c297d49258acf8e0cb3">tPoly_tickPitch</a> (tPoly *const poly)</td></tr>
<tr class="memdesc:gaf30b4a4aabd43c297d49258acf8e0cb3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Execute all tick-rate changes in the poly handler's pitch, including glide and bend.  <a href="group__tpoly.html#gaf30b4a4aabd43c297d49258acf8e0cb3">More...</a><br /></td></tr>
<tr class="separator:gaf30b4a4aabd43c297d49258acf8e0cb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4391da808d7e621ac86944f745a2f729"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#ga4391da808d7e621ac86944f745a2f729">tPoly_tickPitchGlide</a> (tPoly *const poly)</td></tr>
<tr class="memdesc:ga4391da808d7e621ac86944f745a2f729"><td class="mdescLeft">&#160;</td><td class="mdescRight">Execute the tick-rate change of the poly handler's pitch glide.  <a href="group__tpoly.html#ga4391da808d7e621ac86944f745a2f729">More...</a><br /></td></tr>
<tr class="separator:ga4391da808d7e621ac86944f745a2f729"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf1bfa43e0337d0e090d3aa5b074b7825"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#gaf1bfa43e0337d0e090d3aa5b074b7825">tPoly_tickPitchBend</a> (tPoly *const poly)</td></tr>
<tr class="memdesc:gaf1bfa43e0337d0e090d3aa5b074b7825"><td class="mdescLeft">&#160;</td><td class="mdescRight">Execute the tick-rate change of the poly handler's pitch bend.  <a href="group__tpoly.html#gaf1bfa43e0337d0e090d3aa5b074b7825">More...</a><br /></td></tr>
<tr class="separator:gaf1bfa43e0337d0e090d3aa5b074b7825"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad85e4d10bb7e8fa66797ad632186459b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#gad85e4d10bb7e8fa66797ad632186459b">tPoly_getNumVoices</a> (tPoly *const poly)</td></tr>
<tr class="memdesc:gad85e4d10bb7e8fa66797ad632186459b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current number of voices available to play notes.  <a href="group__tpoly.html#gad85e4d10bb7e8fa66797ad632186459b">More...</a><br /></td></tr>
<tr class="separator:gad85e4d10bb7e8fa66797ad632186459b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga45962abd5bf3321cedfdb64ab05fd0d7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#ga45962abd5bf3321cedfdb64ab05fd0d7">tPoly_getNumActiveVoices</a> (tPoly *const poly)</td></tr>
<tr class="memdesc:ga45962abd5bf3321cedfdb64ab05fd0d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of voices currently playing notes.  <a href="group__tpoly.html#ga45962abd5bf3321cedfdb64ab05fd0d7">More...</a><br /></td></tr>
<tr class="separator:ga45962abd5bf3321cedfdb64ab05fd0d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga39f47e13c92644d07852a7794fe896c4"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#ga39f47e13c92644d07852a7794fe896c4">tPoly_getPitch</a> (tPoly *const poly, uint8_t voice)</td></tr>
<tr class="memdesc:ga39f47e13c92644d07852a7794fe896c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current pitch of a given voice.  <a href="group__tpoly.html#ga39f47e13c92644d07852a7794fe896c4">More...</a><br /></td></tr>
<tr class="separator:ga39f47e13c92644d07852a7794fe896c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaec4318990ce680cc96df942fd9bd5473"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#gaec4318990ce680cc96df942fd9bd5473">tPoly_getKey</a> (tPoly *const poly, uint8_t voice)</td></tr>
<tr class="memdesc:gaec4318990ce680cc96df942fd9bd5473"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current MIDI note number of a given voice.  <a href="group__tpoly.html#gaec4318990ce680cc96df942fd9bd5473">More...</a><br /></td></tr>
<tr class="separator:gaec4318990ce680cc96df942fd9bd5473"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1f946c78feaa7db4f443bd105e4c7310"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#ga1f946c78feaa7db4f443bd105e4c7310">tPoly_getVelocity</a> (tPoly *const poly, uint8_t voice)</td></tr>
<tr class="memdesc:ga1f946c78feaa7db4f443bd105e4c7310"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current MIDI velocity of a given voice.  <a href="group__tpoly.html#ga1f946c78feaa7db4f443bd105e4c7310">More...</a><br /></td></tr>
<tr class="separator:ga1f946c78feaa7db4f443bd105e4c7310"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga328c5f9e8f8fb7f521298676ab6c5944"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tpoly.html#ga328c5f9e8f8fb7f521298676ab6c5944">tPoly_isOn</a> (tPoly *const poly, uint8_t voice)</td></tr>
<tr class="memdesc:ga328c5f9e8f8fb7f521298676ab6c5944"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current play state of a given voice.  <a href="group__tpoly.html#ga328c5f9e8f8fb7f521298676ab6c5944">More...</a><br /></td></tr>
<tr class="separator:ga328c5f9e8f8fb7f521298676ab6c5944"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Polyphony handler with glide and pitch bend options. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaf530a73c1d8d8d3e20403c9f33c0ab2e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf530a73c1d8d8d3e20403c9f33c0ab2e">&#9670;&nbsp;</a></span>tPoly_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tPoly_init </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>maxNumVoices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_l_e_a_f.html">LEAF</a> *const&#160;</td>
          <td class="paramname"><em>leaf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize a tPoly to the default mempool of a <a class="el" href="struct_l_e_a_f.html" title="Struct for an instance of LEAF.">LEAF</a> instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the tPoly to initialize. </td></tr>
    <tr><td class="paramname">maxNumVoices</td><td>The maximum number of voices this tPoly can handle at once. </td></tr>
    <tr><td class="paramname">leaf</td><td>A pointer to the leaf instance. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga9a3b088e0d32366b6d5f675794becf15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9a3b088e0d32366b6d5f675794becf15">&#9670;&nbsp;</a></span>tPoly_initToPool()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tPoly_initToPool </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>maxNumVoices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">tMempool *const&#160;</td>
          <td class="paramname"><em>pool</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize a tPoly to a specified mempool. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the tPoly to initialize. </td></tr>
    <tr><td class="paramname">mempool</td><td>A pointer to the tMempool to use. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga03c02b27b16f700b55d8536256d310b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga03c02b27b16f700b55d8536256d310b5">&#9670;&nbsp;</a></span>tPoly_free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tPoly_free </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Free a tPoly from its mempool. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the tPoly to free. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga0a52befe767ed6ea96b26d53952a37ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0a52befe767ed6ea96b26d53952a37ea">&#9670;&nbsp;</a></span>tPoly_noteOn()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tPoly_noteOn </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>note</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>vel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add a note with a given velocity to the poly handler. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the relevant tPoly. </td></tr>
    <tr><td class="paramname">note</td><td>The MIDI note number to add. </td></tr>
    <tr><td class="paramname">vel</td><td>The MIDI velocity of the note to add. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The voice that will play the note. </dd></dl>

</div>
</div>
<a id="gaad8376b6c55995e763ce26d084d23a67"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaad8376b6c55995e763ce26d084d23a67">&#9670;&nbsp;</a></span>tPoly_noteOff()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tPoly_noteOff </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>note</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Remove a note from the poly handler. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the relevant tPoly. </td></tr>
    <tr><td class="paramname">note</td><td>The MIDI note number to remove. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The voice that was playing the removed note. </dd></dl>

</div>
</div>
<a id="ga5abdfc6cd4b26b74647cb23a822b0f38"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5abdfc6cd4b26b74647cb23a822b0f38">&#9670;&nbsp;</a></span>tPoly_orderedAddToStack()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tPoly_orderedAddToStack </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>note</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname"></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaf3aae31d4b20eb71be39351989bc06d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf3aae31d4b20eb71be39351989bc06d1">&#9670;&nbsp;</a></span>tPoly_setNumVoices()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tPoly_setNumVoices </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>numVoices</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the number of voices available to play notes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the relevant tPoly. </td></tr>
    <tr><td class="paramname">numVoices</td><td>The new number of available voices. Cannot be greater than the max number voices given in <a class="el" href="group__tpoly.html#gaf530a73c1d8d8d3e20403c9f33c0ab2e" title="Initialize a tPoly to the default mempool of a LEAF instance.">tPoly_init()</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga9ddfc026e440e208064ce48d655ee317"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9ddfc026e440e208064ce48d655ee317">&#9670;&nbsp;</a></span>tPoly_setPitchGlideActive()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tPoly_setPitchGlideActive </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>isActive</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set whether pitch glide over note changes in voices is active. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the relevant tPoly. </td></tr>
    <tr><td class="paramname">isActive</td><td>Whether pitch glide should be active or not. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga12e5fba9072b6e7d91d50a2e3c82bc87"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga12e5fba9072b6e7d91d50a2e3c82bc87">&#9670;&nbsp;</a></span>tPoly_setPitchGlideTime()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tPoly_setPitchGlideTime </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>t</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set how long pitch glide over note changes in voices takes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the relevant tPoly. </td></tr>
    <tr><td class="paramname">t</td><td>The time to glide in milliseconds. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8608941b79fe9ba1b8e92b5a8046a915"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8608941b79fe9ba1b8e92b5a8046a915">&#9670;&nbsp;</a></span>tPoly_setPitchBend()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tPoly_setPitchBend </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>pitchBend</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the amount of pitch bend. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the relevant tPoly. </td></tr>
    <tr><td class="paramname">pitchBend</td><td>The new amount of pitch bend. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8dad5daee7f10d0bb59e96ad55ec0402"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8dad5daee7f10d0bb59e96ad55ec0402">&#9670;&nbsp;</a></span>tPoly_setBendGlideTime()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tPoly_setBendGlideTime </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>t</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname"></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga1f6a93b108ac8654eaa860575d2f1cd5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1f6a93b108ac8654eaa860575d2f1cd5">&#9670;&nbsp;</a></span>tPoly_setBendSamplesPerTick()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tPoly_setBendSamplesPerTick </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>t</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname"></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaf30b4a4aabd43c297d49258acf8e0cb3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf30b4a4aabd43c297d49258acf8e0cb3">&#9670;&nbsp;</a></span>tPoly_tickPitch()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tPoly_tickPitch </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Execute all tick-rate changes in the poly handler's pitch, including glide and bend. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the relevant tPoly. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga4391da808d7e621ac86944f745a2f729"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4391da808d7e621ac86944f745a2f729">&#9670;&nbsp;</a></span>tPoly_tickPitchGlide()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tPoly_tickPitchGlide </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Execute the tick-rate change of the poly handler's pitch glide. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the relevant tPoly. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaf1bfa43e0337d0e090d3aa5b074b7825"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf1bfa43e0337d0e090d3aa5b074b7825">&#9670;&nbsp;</a></span>tPoly_tickPitchBend()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tPoly_tickPitchBend </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Execute the tick-rate change of the poly handler's pitch bend. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the relevant tPoly. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gad85e4d10bb7e8fa66797ad632186459b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad85e4d10bb7e8fa66797ad632186459b">&#9670;&nbsp;</a></span>tPoly_getNumVoices()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tPoly_getNumVoices </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current number of voices available to play notes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the relevant tPoly. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The current number of voices available to play notes. </dd></dl>

</div>
</div>
<a id="ga45962abd5bf3321cedfdb64ab05fd0d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga45962abd5bf3321cedfdb64ab05fd0d7">&#9670;&nbsp;</a></span>tPoly_getNumActiveVoices()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tPoly_getNumActiveVoices </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the number of voices currently playing notes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the relevant tPoly. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of voices currently playing notes. </dd></dl>

</div>
</div>
<a id="ga39f47e13c92644d07852a7794fe896c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga39f47e13c92644d07852a7794fe896c4">&#9670;&nbsp;</a></span>tPoly_getPitch()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float tPoly_getPitch </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>voice</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current pitch of a given voice. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the relevant tPoly. </td></tr>
    <tr><td class="paramname">voice</td><td>The voice to get the pitch of. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The current pitch of the given voice as a fractional MIDI note number. </dd></dl>

</div>
</div>
<a id="gaec4318990ce680cc96df942fd9bd5473"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaec4318990ce680cc96df942fd9bd5473">&#9670;&nbsp;</a></span>tPoly_getKey()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tPoly_getKey </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>voice</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current MIDI note number of a given voice. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the relevant tPoly. </td></tr>
    <tr><td class="paramname">voice</td><td>The voice to get the MIDI note number of. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The MIDI note number of the given voice. </dd></dl>

</div>
</div>
<a id="ga1f946c78feaa7db4f443bd105e4c7310"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1f946c78feaa7db4f443bd105e4c7310">&#9670;&nbsp;</a></span>tPoly_getVelocity()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tPoly_getVelocity </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>voice</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current MIDI velocity of a given voice. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the relevant tPoly. </td></tr>
    <tr><td class="paramname">voice</td><td>The voice to get the MIDI velocity of. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The current MIDI velocity of the given voice. </dd></dl>

</div>
</div>
<a id="ga328c5f9e8f8fb7f521298676ab6c5944"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga328c5f9e8f8fb7f521298676ab6c5944">&#9670;&nbsp;</a></span>tPoly_isOn()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tPoly_isOn </td>
          <td>(</td>
          <td class="paramtype">tPoly *const&#160;</td>
          <td class="paramname"><em>poly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>voice</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current play state of a given voice. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">poly</td><td>A pointer to the relevant tPoly. </td></tr>
    <tr><td class="paramname">voice</td><td>The voice to get the state of. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The current play state of the given voice. </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
</body>
</html>
